import Vue from 'vue'
import Router from 'vue-router'
import Frame from '@/components/Frame'
import Login from '@/components/Login'
import Frame_Index from '@/components/Frame/Index'
import Frame_Member from '@/components/Frame/Member'
import Frame_Points from '@/components/Frame/Points'
import Frame_Cards from '@/components/Frame/Cards'
import Frame_Activity from '@/components/Frame/Activity'
import Frame_Monitor from '@/components/Frame/Monitor'
import Frame_Cheat from '@/components/Frame/Cheat'
import Frame_Setting from '@/components/Frame/Setting'
import Frame_Member_Friendly from '@/components/Frame/Member/Friendly'
import Frame_Member_BlackList from '@/components/Frame/Member/BlackList'
import Frame_Member_Faker from '@/components/Frame/Member/Faker'

Vue.use(Router)

export default new Router({
  routes: [{
      path: "/",
      redirect: '/admin'
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/admin',
      component: Frame,
      children: [{
          path: '',
          component: Frame_Index,
        },
        {
          path: 'member',
          component: Frame_Member,
          children: [{
            title:"会员列表",
            path: 'friendly',
            component: Frame_Member_Friendly,
            meta:{path: 'friendly',}
          }, {
            title:"黑名单",
            path: 'blacklist',
            component: Frame_Member_BlackList,
            meta:{path: 'blacklist',}
          }, {
            title:"虚拟会员",
            path: 'faker',
            component: Frame_Member_Faker,
            meta:{path: 'faker',}
          }, ]
        },
        {
          path: 'points',
          component: Frame_Points
        },
        {
          path: 'cards',
          component: Frame_Cards
        },
        {
          path: 'activity',
          component: Frame_Activity
        },
        {
          path: 'monitor',
          component: Frame_Monitor
        },
        {
          path: 'cheat',
          component: Frame_Cheat
        },
        {
          path: 'setting',
          component: Frame_Setting
        },
      ]

    },
  ]
})
